<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*, java.io.*, java.util.*, database.*" %>
<jsp:useBean id="con" class="database.DatabaseConnection"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Delete Advertising</title>
<style type="text/css">
<!--
body {
	background-image: url(../../image/3110_background/backcolor3.jpg);
	background-repeat: repeat;
}
.STYLE1 {font-size: 18px}
-->
</style></head>

<body>

<form id="form1" name="form1" method="post" action="">
  <table width="681" border="1" align="center">
    <tr>
      <td colspan="5" align="center" valign="middle"><span class="STYLE1">Delete Advertising</span></td>
    </tr>
    <tr>
      <td width="150" align="center" valign="middle" nowrap="nowrap">Picture ID</td>
      <td width="250" align="center" valign="middle" nowrap="nowrap">Picture Name</td>
      <td width="127" align="center" valign="middle" nowrap="nowrap">Data</td>
      <td colspan="2" align="center" valign="middle" nowrap="nowrap">Action</td>
    </tr>
    <%
        con.createConnection();
        ResultSet rs = con.getAdvertising();
        String Advertising_ID = null;
        String Advertising_Name = null;
        String Advertising_Date = null;

                    for (int j = 0; j < 8; j++) {
                        if (rs.next()) {
                            Advertising_ID = rs.getString("Advertising_ID");
                            Advertising_Name = rs.getString("Advertising_Name");
                            Advertising_Date = rs.getString("Advertising_Date");
                    %>
                    <tr align="left" valign="top">
                    <td align="center" valign="middle"><%=Advertising_ID%></td>
                    <td align="center" valign="middle"><%=Advertising_Name%></td>
                    <td align="center" valign="middle"><%=Advertising_Date%></td>
                    <td colspan="2" align="center" valign="middle"><input type="button" value="Delete" target="mainFrame" onClick="window.location.href='DeleteAD.jsp?TF=0&ID=<%=Advertising_ID%>'"></td>
                    </tr>
                    <%
                        }
                    }
                    %>
    <tr>
      <td colspan="3" nowrap="nowrap">&nbsp;</td>
      <td width="64" align="center" valign="middle" nowrap="nowrap">Back</td>
      <td width="56" align="center" valign="middle" nowrap="nowrap">Next</td>
    </tr>
  </table>
</form>
</body>
</html>
